<?php
// +----------------------------------------------------------------------
// | HkCms
// +----------------------------------------------------------------------
// | Copyright (c) 2012-2019 http://www.hkcms.cn, All rights reserved.
// +----------------------------------------------------------------------
// | Author: 广州恒企教育科技有限公司 <admin@hkcms.cn>
// +----------------------------------------------------------------------

namespace app\admin\validate;

use think\Validate;

class Menu extends Validate
{
    protected $rule = [
        'name' => 'require',
        'app' => 'require',
        'controller' => 'require',
        'action' => 'require',
        'status' => 'require|in:0,1',
        'type' => 'require|in:0,1',
    ];

    protected $message  =   [
        'name.require' => '菜单名称不能为空',
        'app.require' => '模块不能为空',
        'controller.require' => '控制器不能为空',
        'action.require' => '方法不能为空',
        'status.require' => '状态值的范围不正确',
        'status.in' => '状态值的范围不正确',
        'type.require' => '状态值的范围不正确',
        'type.in' => '状态值的范围不正确',
    ];
}